package com.bwie.controller;

import com.bwie.pojo.TbBrand;
import com.bwie.service.TbBrandService;
import com.bwie.utils.Result;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shop/index")
public class IndexController {
    @Autowired
    TbBrandService tbBrandService;
    @PostMapping("/addBrand")
    public Result addBrand(@RequestBody TbBrand tbBrand){
        return tbBrandService.addBrand(tbBrand);
    }
    @PostMapping("/getBrandList")
    public Result getBrandList(@RequestBody PageInfoVo pageInfoVo){
        return tbBrandService.getBrandList(pageInfoVo);
    }
    @PostMapping("/updateBrandStatus")
    public Result updateBrandStatus(@RequestBody TbBrand tbBrand){
        return tbBrandService.updateBrandStatus(tbBrand);
    }
}
